/*
 * localStorage 相关操作
 */

const save = (key, value) => {
  localStorage.setItem(key, value);
};

const read = (key) => {
  return localStorage.getItem(key) || '';
};

const clear = () => {
  localStorage.clear();
};

const remove = (key) => {
  localStorage.removeItem(key);
};

export default {
  save,
  read,
  clear,
  remove
}